package com.shxy.dao;

import com.shxy.entity.User;
import com.shxy.entity.user.UserRole;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserRoleDao extends JpaRepository<UserRole, String> {
    /**
     * 查询指定用户的角色列表
     * @param user
     * @return
     */
    List<UserRole> findAllByUser(User user);
}
